package jp.co.iris_ltd.irisphotoeditor.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.SeekBar;

public class BalanceSeekBar extends SeekBar {

    public BalanceSeekBar(Context context) {
        super(context);
    }

    public BalanceSeekBar(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public BalanceSeekBar(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        setMax(getMax() * 2);
    }

    @Override
    public synchronized int getProgress() {
        return super.getProgress() - (getMax() / 2);
    }

    @Override
    public synchronized void setProgress(int progress) {
        super.setProgress(progress);
    }
}
